<template>
  <div class="search-container">
    <h3>枚举</h3>
    <jmash-enum-select
      v-model="entryType"
      placeholder="字典分类"
      :enum-type="Constant.ENUM_ENTRY_TYPES"
      :module="Constant.MODULE_DICT"
      clearable
    />
    <hr />

    <h3>普通数据字典</h3>
    <jmash-dict-select
      v-model="typeId"
      placeholder="证件类型"
      :type-code="Constant.DICT_TYPE_ID"
      clearable
    />
    <jmash-dict-select
      v-model="degree"
      placeholder="第一学历"
      :type-code="Constant.DICT_DEGREE"
      clearable
    />
    <hr />
    <h3>层级数据字典 Code</h3>
    <el-tree-select
      v-model="layoutTest"
      :data="Dict.layoutTestDict.values"
      filterable
      clearable
      check-strictly
      :render-after-expand="false"
      style="styleWidth"
      :placeholder="$t('dictLayEntry.parentId')"
    />
    {{ layoutTest }}
    <hr />
    <h3>层级数据字典 Id</h3>
    <el-tree-select
      v-model="layoutTestId"
      :data="Dict.layoutTestIdDict.values"
      filterable
      clearable
      check-strictly
      :render-after-expand="false"
      style="styleWidth"
      :placeholder="$t('dictLayEntry.parentId')"
    />
    {{ layoutTestId }}
    <hr />

    <h3>业务数据选择</h3>
    <jmash-select
      v-model="typeCode"
      placeholder="字典类型"
      :data="Dict.normalDictType.values"
    />
    <hr />
  </div>
</template>
<script setup lang="ts">
import { ref, type Ref } from "vue";
import { Constant } from "@/constant";
import { Dict } from "@/api/dict/dict";

//枚举
const entryType = ref("");

//普通字典,证件类型
const typeId = ref("");

//普通字典,学历
const degree = ref("");

//业务选择
const typeCode = ref("");
Dict.normalDictType.useValues();

//层级字典Code
const layoutTest = ref("");
Dict.layoutTestDict.useValues();

//层级字典Id
const layoutTestId = ref("");
Dict.layoutTestIdDict.useValues();
</script>
